//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.itheima.pinda.authority.entity.common;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.itheima.pinda.authority.enumeration.common.LogType;
import com.itheima.pinda.vo.base.entity.SuperEntity;
import com.itheima.pinda.common.enums.HttpMethod;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.time.LocalDateTime;
import org.hibernate.validator.constraints.Length;

@TableName("pd_common_opt_log")
@ApiModel(
        value = "OptLog",
        description = "系统日志"
)
public class OptLog extends SuperEntity<Long> {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty("操作IP")
    @Length(
            max = 50,
            message = "操作IP长度不能超过50"
    )
    @TableField(
            value = "request_ip",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String requestIp;
    @ApiModelProperty("日志类型")
    @TableField("type")
    private LogType type;
    @ApiModelProperty("操作人")
    @Length(
            max = 50,
            message = "操作人长度不能超过50"
    )
    @TableField(
            value = "user_name",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String userName;
    @ApiModelProperty("操作描述")
    @Length(
            max = 255,
            message = "操作描述长度不能超过255"
    )
    @TableField(
            value = "description",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String description;
    @ApiModelProperty("类路径")
    @Length(
            max = 255,
            message = "类路径长度不能超过255"
    )
    @TableField(
            value = "class_path",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String classPath;
    @ApiModelProperty("请求方法")
    @Length(
            max = 50,
            message = "请求方法长度不能超过50"
    )
    @TableField(
            value = "action_method",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String actionMethod;
    @ApiModelProperty("请求地址")
    @Length(
            max = 50,
            message = "请求地址长度不能超过50"
    )
    @TableField(
            value = "request_uri",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String requestUri;
    @ApiModelProperty("请求类型")
    @TableField("http_method")
    private HttpMethod httpMethod;
    @ApiModelProperty("请求参数")
    @TableField("params")
    private String params;
    @ApiModelProperty("返回值")
    @TableField("result")
    private String result;
    @ApiModelProperty("异常详情信息")
    @TableField("ex_desc")
    private String exDesc;
    @ApiModelProperty("异常描述")
    @TableField("ex_detail")
    private String exDetail;
    @ApiModelProperty("开始时间")
    @TableField("start_time")
    private LocalDateTime startTime;
    @ApiModelProperty("完成时间")
    @TableField("finish_time")
    private LocalDateTime finishTime;
    @ApiModelProperty("消耗时间")
    @TableField("consuming_time")
    private Long consumingTime;
    @ApiModelProperty("浏览器")
    @Length(
            max = 500,
            message = "浏览器长度不能超过500"
    )
    @TableField(
            value = "ua",
            condition = "%s LIKE CONCAT('%%',#{%s},'%%')"
    )
    private String ua;

    public OptLog(Long id, LocalDateTime createTime, Long createUser, String requestIp, LogType type, String userName, String description, String classPath, String actionMethod, String requestUri, HttpMethod httpMethod, String params, String result, String exDesc, String exDetail, LocalDateTime startTime, LocalDateTime finishTime, Long consumingTime, String ua) {
        this.id = id;
        this.createTime = createTime;
        this.createUser = createUser;
        this.requestIp = requestIp;
        this.type = type;
        this.userName = userName;
        this.description = description;
        this.classPath = classPath;
        this.actionMethod = actionMethod;
        this.requestUri = requestUri;
        this.httpMethod = httpMethod;
        this.params = params;
        this.result = result;
        this.exDesc = exDesc;
        this.exDetail = exDetail;
        this.startTime = startTime;
        this.finishTime = finishTime;
        this.consumingTime = consumingTime;
        this.ua = ua;
    }

    public static OptLogBuilder builder() {
        return new OptLogBuilder();
    }

    public String getRequestIp() {
        return this.requestIp;
    }

    public LogType getType() {
        return this.type;
    }

    public String getUserName() {
        return this.userName;
    }

    public String getDescription() {
        return this.description;
    }

    public String getClassPath() {
        return this.classPath;
    }

    public String getActionMethod() {
        return this.actionMethod;
    }

    public String getRequestUri() {
        return this.requestUri;
    }

    public HttpMethod getHttpMethod() {
        return this.httpMethod;
    }

    public String getParams() {
        return this.params;
    }

    public String getResult() {
        return this.result;
    }

    public String getExDesc() {
        return this.exDesc;
    }

    public String getExDetail() {
        return this.exDetail;
    }

    public LocalDateTime getStartTime() {
        return this.startTime;
    }

    public LocalDateTime getFinishTime() {
        return this.finishTime;
    }

    public Long getConsumingTime() {
        return this.consumingTime;
    }

    public String getUa() {
        return this.ua;
    }

    public OptLog setRequestIp(final String requestIp) {
        this.requestIp = requestIp;
        return this;
    }

    public OptLog setType(final LogType type) {
        this.type = type;
        return this;
    }

    public OptLog setUserName(final String userName) {
        this.userName = userName;
        return this;
    }

    public OptLog setDescription(final String description) {
        this.description = description;
        return this;
    }

    public OptLog setClassPath(final String classPath) {
        this.classPath = classPath;
        return this;
    }

    public OptLog setActionMethod(final String actionMethod) {
        this.actionMethod = actionMethod;
        return this;
    }

    public OptLog setRequestUri(final String requestUri) {
        this.requestUri = requestUri;
        return this;
    }

    public OptLog setHttpMethod(final HttpMethod httpMethod) {
        this.httpMethod = httpMethod;
        return this;
    }

    public OptLog setParams(final String params) {
        this.params = params;
        return this;
    }

    public OptLog setResult(final String result) {
        this.result = result;
        return this;
    }

    public OptLog setExDesc(final String exDesc) {
        this.exDesc = exDesc;
        return this;
    }

    public OptLog setExDetail(final String exDetail) {
        this.exDetail = exDetail;
        return this;
    }

    public OptLog setStartTime(final LocalDateTime startTime) {
        this.startTime = startTime;
        return this;
    }

    public OptLog setFinishTime(final LocalDateTime finishTime) {
        this.finishTime = finishTime;
        return this;
    }

    public OptLog setConsumingTime(final Long consumingTime) {
        this.consumingTime = consumingTime;
        return this;
    }

    public OptLog setUa(final String ua) {
        this.ua = ua;
        return this;
    }

    public OptLog() {
    }

    public OptLog(final String requestIp, final LogType type, final String userName, final String description, final String classPath, final String actionMethod, final String requestUri, final HttpMethod httpMethod, final String params, final String result, final String exDesc, final String exDetail, final LocalDateTime startTime, final LocalDateTime finishTime, final Long consumingTime, final String ua) {
        this.requestIp = requestIp;
        this.type = type;
        this.userName = userName;
        this.description = description;
        this.classPath = classPath;
        this.actionMethod = actionMethod;
        this.requestUri = requestUri;
        this.httpMethod = httpMethod;
        this.params = params;
        this.result = result;
        this.exDesc = exDesc;
        this.exDetail = exDetail;
        this.startTime = startTime;
        this.finishTime = finishTime;
        this.consumingTime = consumingTime;
        this.ua = ua;
    }

    public String toString() {
        return "OptLog(super=" + super.toString() + ", requestIp=" + this.getRequestIp() + ", type=" + this.getType() + ", userName=" + this.getUserName() + ", description=" + this.getDescription() + ", classPath=" + this.getClassPath() + ", actionMethod=" + this.getActionMethod() + ", requestUri=" + this.getRequestUri() + ", httpMethod=" + this.getHttpMethod() + ", params=" + this.getParams() + ", result=" + this.getResult() + ", exDesc=" + this.getExDesc() + ", exDetail=" + this.getExDetail() + ", startTime=" + this.getStartTime() + ", finishTime=" + this.getFinishTime() + ", consumingTime=" + this.getConsumingTime() + ", ua=" + this.getUa() + ")";
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof OptLog)) {
            return false;
        } else {
            OptLog other = (OptLog)o;
            if (!other.canEqual(this)) {
                return false;
            } else if (!super.equals(o)) {
                return false;
            } else {
                label205: {
                    Object this$requestIp = this.getRequestIp();
                    Object other$requestIp = other.getRequestIp();
                    if (this$requestIp == null) {
                        if (other$requestIp == null) {
                            break label205;
                        }
                    } else if (this$requestIp.equals(other$requestIp)) {
                        break label205;
                    }

                    return false;
                }

                label198: {
                    Object this$type = this.getType();
                    Object other$type = other.getType();
                    if (this$type == null) {
                        if (other$type == null) {
                            break label198;
                        }
                    } else if (this$type.equals(other$type)) {
                        break label198;
                    }

                    return false;
                }

                Object this$userName = this.getUserName();
                Object other$userName = other.getUserName();
                if (this$userName == null) {
                    if (other$userName != null) {
                        return false;
                    }
                } else if (!this$userName.equals(other$userName)) {
                    return false;
                }

                label184: {
                    Object this$description = this.getDescription();
                    Object other$description = other.getDescription();
                    if (this$description == null) {
                        if (other$description == null) {
                            break label184;
                        }
                    } else if (this$description.equals(other$description)) {
                        break label184;
                    }

                    return false;
                }

                Object this$classPath = this.getClassPath();
                Object other$classPath = other.getClassPath();
                if (this$classPath == null) {
                    if (other$classPath != null) {
                        return false;
                    }
                } else if (!this$classPath.equals(other$classPath)) {
                    return false;
                }

                label170: {
                    Object this$actionMethod = this.getActionMethod();
                    Object other$actionMethod = other.getActionMethod();
                    if (this$actionMethod == null) {
                        if (other$actionMethod == null) {
                            break label170;
                        }
                    } else if (this$actionMethod.equals(other$actionMethod)) {
                        break label170;
                    }

                    return false;
                }

                Object this$requestUri = this.getRequestUri();
                Object other$requestUri = other.getRequestUri();
                if (this$requestUri == null) {
                    if (other$requestUri != null) {
                        return false;
                    }
                } else if (!this$requestUri.equals(other$requestUri)) {
                    return false;
                }

                Object this$httpMethod = this.getHttpMethod();
                Object other$httpMethod = other.getHttpMethod();
                if (this$httpMethod == null) {
                    if (other$httpMethod != null) {
                        return false;
                    }
                } else if (!this$httpMethod.equals(other$httpMethod)) {
                    return false;
                }

                Object this$params = this.getParams();
                Object other$params = other.getParams();
                if (this$params == null) {
                    if (other$params != null) {
                        return false;
                    }
                } else if (!this$params.equals(other$params)) {
                    return false;
                }

                label142: {
                    Object this$result = this.getResult();
                    Object other$result = other.getResult();
                    if (this$result == null) {
                        if (other$result == null) {
                            break label142;
                        }
                    } else if (this$result.equals(other$result)) {
                        break label142;
                    }

                    return false;
                }

                label135: {
                    Object this$exDesc = this.getExDesc();
                    Object other$exDesc = other.getExDesc();
                    if (this$exDesc == null) {
                        if (other$exDesc == null) {
                            break label135;
                        }
                    } else if (this$exDesc.equals(other$exDesc)) {
                        break label135;
                    }

                    return false;
                }

                Object this$exDetail = this.getExDetail();
                Object other$exDetail = other.getExDetail();
                if (this$exDetail == null) {
                    if (other$exDetail != null) {
                        return false;
                    }
                } else if (!this$exDetail.equals(other$exDetail)) {
                    return false;
                }

                label121: {
                    Object this$startTime = this.getStartTime();
                    Object other$startTime = other.getStartTime();
                    if (this$startTime == null) {
                        if (other$startTime == null) {
                            break label121;
                        }
                    } else if (this$startTime.equals(other$startTime)) {
                        break label121;
                    }

                    return false;
                }

                label114: {
                    Object this$finishTime = this.getFinishTime();
                    Object other$finishTime = other.getFinishTime();
                    if (this$finishTime == null) {
                        if (other$finishTime == null) {
                            break label114;
                        }
                    } else if (this$finishTime.equals(other$finishTime)) {
                        break label114;
                    }

                    return false;
                }

                Object this$consumingTime = this.getConsumingTime();
                Object other$consumingTime = other.getConsumingTime();
                if (this$consumingTime == null) {
                    if (other$consumingTime != null) {
                        return false;
                    }
                } else if (!this$consumingTime.equals(other$consumingTime)) {
                    return false;
                }

                Object this$ua = this.getUa();
                Object other$ua = other.getUa();
                if (this$ua == null) {
                    if (other$ua != null) {
                        return false;
                    }
                } else if (!this$ua.equals(other$ua)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof OptLog;
    }

    public int hashCode() {
        Boolean PRIME = true;
        int result = super.hashCode();
        Object $requestIp = this.getRequestIp();
        result = result * 59 + ($requestIp == null ? 43 : $requestIp.hashCode());
        Object $type = this.getType();
        result = result * 59 + ($type == null ? 43 : $type.hashCode());
        Object $userName = this.getUserName();
        result = result * 59 + ($userName == null ? 43 : $userName.hashCode());
        Object $description = this.getDescription();
        result = result * 59 + ($description == null ? 43 : $description.hashCode());
        Object $classPath = this.getClassPath();
        result = result * 59 + ($classPath == null ? 43 : $classPath.hashCode());
        Object $actionMethod = this.getActionMethod();
        result = result * 59 + ($actionMethod == null ? 43 : $actionMethod.hashCode());
        Object $requestUri = this.getRequestUri();
        result = result * 59 + ($requestUri == null ? 43 : $requestUri.hashCode());
        Object $httpMethod = this.getHttpMethod();
        result = result * 59 + ($httpMethod == null ? 43 : $httpMethod.hashCode());
        Object $params = this.getParams();
        result = result * 59 + ($params == null ? 43 : $params.hashCode());
        Object $result = this.getResult();
        result = result * 59 + ($result == null ? 43 : $result.hashCode());
        Object $exDesc = this.getExDesc();
        result = result * 59 + ($exDesc == null ? 43 : $exDesc.hashCode());
        Object $exDetail = this.getExDetail();
        result = result * 59 + ($exDetail == null ? 43 : $exDetail.hashCode());
        Object $startTime = this.getStartTime();
        result = result * 59 + ($startTime == null ? 43 : $startTime.hashCode());
        Object $finishTime = this.getFinishTime();
        result = result * 59 + ($finishTime == null ? 43 : $finishTime.hashCode());
        Object $consumingTime = this.getConsumingTime();
        result = result * 59 + ($consumingTime == null ? 43 : $consumingTime.hashCode());
        Object $ua = this.getUa();
        result = result * 59 + ($ua == null ? 43 : $ua.hashCode());
        return result;
    }

    public static class OptLogBuilder {
        private Long id;
        private LocalDateTime createTime;
        private Long createUser;
        private String requestIp;
        private LogType type;
        private String userName;
        private String description;
        private String classPath;
        private String actionMethod;
        private String requestUri;
        private HttpMethod httpMethod;
        private String params;
        private String result;
        private String exDesc;
        private String exDetail;
        private LocalDateTime startTime;
        private LocalDateTime finishTime;
        private Long consumingTime;
        private String ua;

        OptLogBuilder() {
        }

        public OptLogBuilder id(final Long id) {
            this.id = id;
            return this;
        }

        public OptLogBuilder createTime(final LocalDateTime createTime) {
            this.createTime = createTime;
            return this;
        }

        public OptLogBuilder createUser(final Long createUser) {
            this.createUser = createUser;
            return this;
        }

        public OptLogBuilder requestIp(final String requestIp) {
            this.requestIp = requestIp;
            return this;
        }

        public OptLogBuilder type(final LogType type) {
            this.type = type;
            return this;
        }

        public OptLogBuilder userName(final String userName) {
            this.userName = userName;
            return this;
        }

        public OptLogBuilder description(final String description) {
            this.description = description;
            return this;
        }

        public OptLogBuilder classPath(final String classPath) {
            this.classPath = classPath;
            return this;
        }

        public OptLogBuilder actionMethod(final String actionMethod) {
            this.actionMethod = actionMethod;
            return this;
        }

        public OptLogBuilder requestUri(final String requestUri) {
            this.requestUri = requestUri;
            return this;
        }

        public OptLogBuilder httpMethod(final HttpMethod httpMethod) {
            this.httpMethod = httpMethod;
            return this;
        }

        public OptLogBuilder params(final String params) {
            this.params = params;
            return this;
        }

        public OptLogBuilder result(final String result) {
            this.result = result;
            return this;
        }

        public OptLogBuilder exDesc(final String exDesc) {
            this.exDesc = exDesc;
            return this;
        }

        public OptLogBuilder exDetail(final String exDetail) {
            this.exDetail = exDetail;
            return this;
        }

        public OptLogBuilder startTime(final LocalDateTime startTime) {
            this.startTime = startTime;
            return this;
        }

        public OptLogBuilder finishTime(final LocalDateTime finishTime) {
            this.finishTime = finishTime;
            return this;
        }

        public OptLogBuilder consumingTime(final Long consumingTime) {
            this.consumingTime = consumingTime;
            return this;
        }

        public OptLogBuilder ua(final String ua) {
            this.ua = ua;
            return this;
        }

        public OptLog build() {
            return new OptLog(this.id, this.createTime, this.createUser, this.requestIp, this.type, this.userName, this.description, this.classPath, this.actionMethod, this.requestUri, this.httpMethod, this.params, this.result, this.exDesc, this.exDetail, this.startTime, this.finishTime, this.consumingTime, this.ua);
        }

        public String toString() {
            return "OptLog.OptLogBuilder(id=" + this.id + ", createTime=" + this.createTime + ", createUser=" + this.createUser + ", requestIp=" + this.requestIp + ", type=" + this.type + ", userName=" + this.userName + ", description=" + this.description + ", classPath=" + this.classPath + ", actionMethod=" + this.actionMethod + ", requestUri=" + this.requestUri + ", httpMethod=" + this.httpMethod + ", params=" + this.params + ", result=" + this.result + ", exDesc=" + this.exDesc + ", exDetail=" + this.exDetail + ", startTime=" + this.startTime + ", finishTime=" + this.finishTime + ", consumingTime=" + this.consumingTime + ", ua=" + this.ua + ")";
        }
    }
}
